#include <assert.h>
#include "giserpdao_factory.h"
#include "giserpdao_stub4web.h"
#include "giserpdao_stub4app.h"
//#include "giserpdao.h"

using namespace erp::gis::dao;

bool CGisErpDaoFactory::s_GisErpDaoInit = false;

IGisErpDao* CGisErpDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CGisErpDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_GisErpDaoInit)
        {
            int iRetCode = CGisErpDao::Initialize();
            assert(iRetCode == 0);
            s_GisErpDaoInit = true;
        }   	
        return (new CGisErpDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IGisErpDaoAsyc* CGisErpDaoFactory::GetAsycObject()
{
	return (new CGisErpDaoStub4App);
}
